package org.example.app.repository;

import org.example.app.model.BookKeep;
import org.example.app.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.awt.print.Book;
import java.util.List;
import java.util.Optional;

@Repository
public interface BookKeepRepository extends JpaRepository<BookKeep, Integer> , JpaSpecificationExecutor<BookKeep> {


     Optional<BookKeep> findByid(Integer id) ;

    List<BookKeep> findByUser(User user);

    void deleteByUser(User user);


    List<BookKeep> findByUserAndType(User user, int i);
}
